package com.example.study.init;

import com.example.study.config.JdbcConfig;
import com.example.study.config.MvcConfig;
import com.example.study.config.MyBatisConfig;
import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;

/**
 * @Author 宋伟宁
 * @Date 2023/10/8
 * @Version 1.0
 **/
public class WebInitializer extends AbstractAnnotationConfigDispatcherServletInitializer {
    @Override
    protected Class<?>[] getRootConfigClasses() {
        return new Class[]{
                JdbcConfig.class,
                MyBatisConfig.class,
                MvcConfig.class
        };
    }

    @Override
    protected Class<?>[] getServletConfigClasses() {
        return new Class[0];
    }

    @Override
    protected String[] getServletMappings() {
        return new String[]{"/"};
    }
}
